package com.dc.business.datacollectbusiness.mapper;

import com.dc.business.datacollectbusiness.entity.Company;
import com.dc.business.datacollectbusiness.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    public User selectUserByUsername(String userName);
    public List<User> selectAllUser(@Param("startIndex") int startIndex, @Param("pageSize") int pageSize,String companyName,String phoneNumber);
    public void insertUser(User user);
    public void updateUser(User user);
    public boolean deleteUserByUserId(Integer userId);
    /**
     * 获取用户个数
     */
    public int selectAllUsersum(String companyName,String phoneNumber);

    /**
     * 通过id查询用户
     */
    public User getUserByid(int userId);

    /**
     * 通过用户名查询用户id
     */
    public int getUseridByuserName(String userName);

    /**
     * 通过公司名称查询用户个数
     */
    public int getUsersumByCompanyName(String companyName);


    //小程序
    /**
     * 修改密码
     */
    public boolean upPasswd(String companyName, String userName, String newPassword);

}
